package com.bafa.front.events;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.bafa.front.presentationbeans.playerhistory.PlayerHistoryBean;
import com.bafa.objects.PageBean;

public class DisplayPlayerDetailsEvent extends Event{

	public void doEvent(HttpServletRequest request, HttpServletResponse response,PageBean page) {

		
		PlayerHistoryBean playerHistoryBean = new PlayerHistoryBean(request.getParameter("playername"));
		request.setAttribute("PLAYERHISTORY",playerHistoryBean);
		page.setPageheader(playerHistoryBean.getName()+"'s Total Goals = "+playerHistoryBean.getTotalGoals());
	}

}
